.TH E1432_SET_XXXX_XXXX_TIME 3 E1432
.SH NAME
.nf
e1432_set_peak_decay_time \- Set Peak detection decay time constant
e1432_get_peak_decay_time \- Get current Peak detection decay time constant
e1432_set_rms_avg_time \- Set RMS averaging decay time constant
e1432_get_rms_avg_time \- Get current RMS averaging decay time constant
e1432_set_rms_decay_time \- Set RMS decay time constant
e1432_get_rms_decay_time \- Get current RMS decay time constant
.IX e1432_set_peak_decay_time(3) 3
.IX e1432_get_peak_decay_time(3) 3
.IX e1432_set_rms_avg_time(3) 3
.IX e1432_get_rms_avg_time(3) 3
.IX e1432_set_rms_decay_time(3) 3
.IX e1432_get_rms_decay_time(3) 3
.SH SYNOPSIS
.cS
SHORTSIZ16 e1432_set_peak_decay_time(E1432ID hw, SHORTSIZ16 ID,
                                     FLOATSIZ32 peak_decay_time)
SHORTSIZ16 e1432_get_peak_decay_time(E1432ID hw, SHORTSIZ16 ID,
                                     FLOATSIZ32 *peak_decay_time)
SHORTSIZ16 e1432_set_rms_avg_time(E1432ID hw, SHORTSIZ16 ID,
                                  FLOATSIZ32 rms_avg_time)
SHORTSIZ16 e1432_get_rms_avg_time(E1432ID hw, SHORTSIZ16 ID,
                                  FLOATSIZ32 *rms_avg_time)
SHORTSIZ16 e1432_set_rms_decay_time(E1432ID hw, SHORTSIZ16 ID,
                                    FLOATSIZ32 rms_decay_time)
SHORTSIZ16 e1432_get_rms_decay_time(E1432ID hw, SHORTSIZ16 ID,
                                    FLOATSIZ32 *rms_decay_time)
.cE
.SH DESCRIPTION

\fIe1432_set_peak_decay_time\fR sets the exponential decay time constant,
in seconds, for the Peak detection current value for a module,
the time for a Peak value to decay to 37%, in voltage equivalent.
This decay is only approximately exponential and breaks
down under the conditions below.

\fIe1432_set_rms_avg_time\fR sets the exponential averaging time constant,
in seconds, for the RMS current value for a module,
the time for the internal RMS average value to decay to 37%,
in power equivalent.
The RMS power value is peak detected
and \fIe1432_set_rms_decay_time\fR sets the exponential decay time constant,
in seconds, power equivalent,
for this peak detection and the peak detected value becomes the
value returned by \fIe1432_get_current_value\fR.
Both of these these decays are only approximately exponential and break down
under the conditions below.

The Peak and RMS values returned by \fIe1432_get_current_value\fR
are affected by these three parameters.
The Peak and/or RMS values in the data trailer
are also affected by these parameters when Peak detection is enabled
using the \fBE1432_PEAK_MODE_FILT\fR parameter
when calling the \fIe1432_set_peak_mode\fR function
and/or RMS computations are enabled
using the \fBE1432_RMS_MODE_FILT\fR parameter
when calling the \fIe1432_set_rms_mode\fR function.
The Peak and/or RMS values in the data trailer are uniformly weighted
and not affected by these parameters
when Peak detection is enabled using the \fBE1432_PEAK_MODE_BLOCK\fR parameter
and/or RMS computations are enabled
using the \fBE1432_RMS_MODE_BLOCK\fR parameter.

\fIe1432_get_peak_decay_time\fR, \fIe1432_get_rms_avg_time\fR, and
\fIe1432_get_rms_decay_time\fR return the current value of their parameters
to a floating point variable pointed by \fIpeak_decay_time\fR,
\fIrms_avg_time\fR, and \fIrms_decay_time\fR respectively.

\fIhw\fR must be the result of a successful call to
\fIe1432_assign_channel_numbers\fR, and specifies the group of
hardware to talk to.

\fIID\fR is either the ID of a group of channels that was obtained
with a call to \fIe1432_create_channel_group\fR, or the ID of a single
channel and is used to determine which module(s) the function call applies to.

\fIpeak_decay_time\fR may be any value between \fBE1432_PEAK_DECAY_TIME_MIN\fR
(0) seconds and \fBE1432_PEAK_DECAY_TIME_MAX\fR seconds inclusive.

Likewise, \fIrms_avg_time\fR may be any value between
\fBE1432_RMS_AVG_TIME_MIN\fR (0) seconds and
\fBE1432_RMS_AVG_TIME_MAX\fR seconds inclusive.

\fIrms_decay_time\fR may be any value between
\fBE1432_RMS_DECAY_TIME_MIN\fR (0) seconds and
\fBE1432_RMS_DECAY_TIME_MAX\fR seconds inclusive.
The RMS peak decay time should be set to BE1432_RMS_DECAY_TIME_MIN (0)
for the RMS current value to be a simple RMS exponential average,
without peak detection.

With the correct choice of \fIrms_avg_time\fR and \fIrms_decay_time\fR,
the "Slow", "Fast", and "Impulse" response characteristics of ANSI S1.4-1983
can be approximated.

When \fIpeak_decay_time\fR, \fIrms_avg_time\fR, or \fIrms_decay_time\fR
approach the neighborhood of 8-16 times the decimated sample interval
(1 divided by the value returned by \fIe1432_get_span\fR),
the exponential peak decay begins to break down and tends towards a uniform
weighting.
The length of the minimum, uniform weighting is 16 decimated samples
if both Peak detection and RMS computation are turned on with
\fIe1432_set_peak_mode\fR and \fIe1432_set_rms_mode\fR.
If only one of these are turned on, the length of the minimum,
uniform weighting is 8 decimated samples.
Then decimated sample rate is doubled by each of: setting
\fBE1432_DECIMATION_OVERSAMPLE_ON\fR with \fIe1432_set_decimation_oversample\fR
and setting \fBE1432_MULTIPASS\fR with \fIe1432_set_decimation_output\fR.

Peak detection and RMS computations are currently available only on the E1433.

If any of these parameter are changed while a measurement is running,
the change will not have any effect until the start of the next measurement.
.SH "RESET VALUE"
After a reset, \fIpeak_decay_time\fR is set to 1.5 seconds.
\fIrms_avg_time\fR is set to 1.0 seconds
and \fIrms_decay_time\fR to 0.0 seconds,
approximating the "Slow" response characteristics of ANSI S1.4-1983.
.SH "RETURN VALUE"
Return 0 if successful, a (negative) error number otherwise.
.SH "SEE ALSO"
.na
e1432_set_clock_freq,
e1432_set_peak_mode, e1432_set_rms_mode,
e1432_get_current_value.
e1432_set_weighting
.ad
